@import "./base.module.less";
@import "./reset.module.less";

.non-select-text() {
    -o-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -khtml-user-select: none;
    user-select: none;
}

.clear-fl::after {
    display: block;
    content: "";
    clear: both;
}

.ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.non-select-text {
    .non-select-text();
}

.ivu-message {
    z-index: 99999 !important;
}

//基础设置、高级设置
.df-setting {
    width: 600px;
    margin: 16px auto;

    .inner {
        margin: 16px 0 25px;
        border-radius: 8px;
        padding: 20px 30px;
        background: #fff;

        .ivu-form-item-label {
            font-size: 0;

            .label {
                color: rgba(0, 0, 0, 0.85);
                font-size: 14px;

                strong {
                    color: rgba(0, 0, 0, 0.45);
                    font-size: 12px;
                    font-weight: 500;
                    margin-left: 10px;
                }
            }
        }

        .ivu-form-item-content {
            .template-icon {
                display: flex;
                align-items: center;
                height: 40px;

                .icon {
                    width: 40px;
                    height: 100%;
                    display: block;
                    margin: 5px;
                    float: left;
                    border-radius: 5px;
                    background-repeat: no-repeat;
                    background-size: 100%;
                    margin-right: 7px;
                    cursor: pointer;
                }
            }
        }
    }

    &_icons-modal {
        .icons-modal-container {
            a {
                position: relative;
                display: block;
                float: left;
                width: 38px;
                width: 38px;
                margin: 5px;
                opacity: 0.5;

                .ivu-icon {
                    position: absolute;
                    right: 3px;
                    bottom: 6px;
                    color: #fff;
                    display: none;
                }

                img {
                    width: 100%;
                    height: 100%;
                    border-radius: 5px;
                }

                &.selected {
                    opacity: 1;

                    .ivu-icon {
                        display: block;
                    }
                }
            }
        }
    }

    .ivu-tooltip-rel {
        font-size: 0;

        .rel-content {
            .ivu-icon {
                font-size: 16px;
            }
        }
    }

    .ivu-tooltip-inner {
        font-size: 12px;
        white-space: inherit;
    }
}

//预览表单
.df-form-preview {
    background: url("../FormPreview/images/bg.jpg") no-repeat top center fixed;
    min-height: 100vh;

    .header {
        display: flex;
        justify-content: center;
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 70px;
        background-color: #fff;
        box-shadow: 0 0 15px 0 rgba(29, 50, 71, 0.1);
        z-index: 999;

        &-nav {
            display: flex;

            li {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                width: 88px;
                height: 70px;
                color: #626466;
                box-shadow: -1px 0px 0px 0px rgba(240, 240, 240, 1),
                    1px 0px 0px 0px rgba(240, 240, 240, 1);
                transition: all 0.3s ease-in-out;
                cursor: pointer;

                &:hover,
                &.current {
                    color: #fff;
                    background-color: #1ea0fa;
                }

                h4 {
                    font-weight: 500;
                    margin-top: 5px;
                }
            }
        }
    }

    .content {
        padding-top: 120px;
        padding-bottom: 90px;
    }

    .web-preview,
    .app-preview {
        min-height: 500px;
        margin: 0 auto;
        background-color: #fff;
        box-shadow: 0 0 8px 0 rgba(29, 50, 71, 0.3);
    }

    .web-preview {
        width: 720px;
        padding: 0 30px 40px;
    }

    .app-preview {
        width: 420px;

        .top {
            padding: 0 20px;
        }

        .df-form-render {
            width: auto;
        }
    }

    &_title {
        font-size: 20px;
        font-weight: 600;
        color: #0ab0cd;
        text-align: center;
        line-height: 90px;
    }

    &_describe {
        color: #555;
        font-size: 15px;
        text-indent: 2em;
        padding-bottom: 7px;
        border-bottom: 1px dashed #ccc;
    }
}

@media screen and (min-width: 320px) and (max-width: 768px) {
    .df-setting {
        width: auto;
        padding: 20px 15px;
        margin: 0;
        background-color: #fff;

        .ivu-form-item-label {
            text-align: left;

            .label strong {
                display: block;
                margin-top: 5px;
                margin-left: 0 !important;
            }
        }

        .ivu-dropdown {
            display: block;
        }

        .inner {
            padding: 0;
            margin: 0;
        }
    }
}